home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-18 | 2.4 KB | 66 lines | [TEXT/MPS ] |
- /********************************************************************************/
- /* */
- /* FileTask.h - A/ROSE file system defines. */
- /* */
- /* Richard W. Mincher. December 20, 1989. */
- /* */
- /* Modified by Anumele D. Raja on June 17, 1991 */
- /* */
- /* Copyright © 1989, 1990 Apple Computer, Inc. All rights reserved. */
- /* */
- /********************************************************************************/
-
- const char kFileSystemObjectName[] = "Prototype";
- const char kFileSystemTypeName[] = "FileSystem";
-
- #define FS_OPEN 0x1000
- #define FS_OPENRF 0x1002
- #define FS_READ 0x1004
- #define FS_WRITE 0x1006
- #define FS_GETFPOS 0x1008
- #define FS_SETFPOS 0x100A
- #define FS_GETEOF 0x100C
- #define FS_SETEOF 0x100E
- #define FS_ALLOCATE 0x1010
- #define FS_CLOSE 0x1012
- #define FS_CREATE 0x1014
- #define FS_DELETE 0x1016
- #define FS_GETFINFO 0x1018
- #define FS_SETFINFO 0x101A
- #define FS_SETFLOCK 0x101C
- #define FS_RSTFLOCK 0x101E
- #define FS_RENAME 0x1020
-
- #ifndef __FILES__
- struct FInfo {
- unsigned long fdType; /*the type of the file*/
- unsigned long fdCreator; /*file's creator*/
- unsigned short fdFlags; /*flags ex. hasbundle,invisible,locked, etc.*/
- unsigned short h;
- unsigned short v; /*file's location in folder*/
- short fdFldr; /*folder containing file*/
- };
-
- typedef struct FInfo FInfo;
-
- // A/ROSE File System Calls
-
- short AFSOpen( char *fileName, short vRefNum, short *refNum );
- short AOpenRF( char *fileName, short vRefNum, short *refNum );
- short AFSRead( short refNum, long *count, char *buffPtr );
- short AFSWrite( short refNum, long *count, char *buffPtr );
- short AGetFPos( short refNum, long *filePos );
- short ASetFPos( short refNum, short posMode, long posOff );
- short AGetEOF( short refNum, long *logEOF );
- short ASetEOF( short refNum, long logEOF );
- short AAllocate( short refNum, long *count );
- short AFSClose( short refNum );
- short ACreate( char *fileName, short vRefNum, long creator, long fileType );
- short AFSDelete( char *fileName, short vRefNum );
- short AGetFInfo( char *fileName, short vRefNum, FInfo *fndrInfo );
- short ASetFInfo( char *fileName, short vRefNum, FInfo *fndrInfo );
- short ASetFLock( char *fileName, short vRefNum );
- short ARstFLock( char *fileName, short vRefNum );
- short ARename( char *oldName, short vRefNum, char *newName );
-
- #endif